package fr.grobim.hangovers.gestionBudget.actions.factures;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Actions;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.ResultPath;

import fr.grobim.hangovers.gestionBudget.actions.enums.AttributsSession;
import fr.grobim.hangovers.gestionBudget.actions.support.AbstractActionSupport;

@Namespace(value = "/")
@ResultPath(value = "/")
@Actions({
	@Action(value = "lienGestionSourcesFacture", results = {
		@Result(location = "facture.gestionSources.lister", type = "tiles")}),
	@Action(value = "lienGestionFacture", results = {
			@Result(location = "chargerGestionFacture", type = "redirect")}),
	@Action(value = "lienMonCompte", results = {
			@Result(location = "compte.monCompte.detail", type = "tiles")}),
	@Action(value = "lienGestionComptes", results = {
			@Result(location = "compte.gererComptes.lister", type = "tiles")})
	})
public class RedirectionsSimplesAction extends AbstractActionSupport {

	private static final long serialVersionUID = 1L;

	@Override
	public String execute() throws Exception {
		this.retirerObjetDeSession(AttributsSession.GESTION_FACTURE_LISTE);
		this.retirerObjetDeSession(AttributsSession.GESTION_SOURCE_FACTURE_LISTE);
		this.retirerObjetDeSession(AttributsSession.GESTION_REGLEMENT_ID_FACTURE);
		return SUCCESS;
	}
	
}
